<!--
 * @FilePath     : /study_code/layui/6-3-1.html
 * @Description  : layer.config() layer 全局配置
 * @Date         : 2025-04-08 16:41:52
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-08 16:43:13
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/css/layui.css" />
  </head>
  <body>
    <h2>layui根文件</h2>
    <script src="/layui/dist/layui.js"></script>
    <script>
      layui.use('layer', function () {
        var layer = layui.layer

        /**
         * @brief: layer 全局配置
         * @param {Object} opts
         * @return {*}
         */
        // layer.config(opts)
        layer.config({
          anim: 3,
          skin: 'layui-layer-molv', //默认皮肤
          offset: ['100px', '50px'], // 自定义位置
        })

        layer.msg('我是标题')

        setTimeout(function () {
          layer.msg('第二个标题')
        }, 1000)
      })
    </script>
  </body>
</html>
